package com.topisv.tms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name = "brand")
public class Brand extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String brandName;
	
	private String brandCode;
	
	private Customers customers;
	
	private Long customersId;
	
	private String picture;
	
	private String packlist;
	
	private int packformStyleSize;
	

	@Transient
	@JsonIgnore
	public int getPackformStyleSize() {
		return packformStyleSize;
	}

	public void setPackformStyleSize(int packformStyleSize) {
		this.packformStyleSize = packformStyleSize;
	}

	public Brand() {
	}

	public Brand(Long id) {
		this.id = id;
	}

	@Column(name="brand_name")
	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}

	@Column(name="brand_code")
	public String getBrandCode() {
		return brandCode;
	}

	public void setBrandCode(String brandCode) {
		this.brandCode = brandCode;
	}

	@ManyToOne
	@JoinColumn(name = "customers_id")
	public Customers getCustomers() {
		return customers;
	}

	public void setCustomers(Customers customers) {
		this.customers = customers;
	}
	
	@Transient
	@JsonIgnore
	public Long getCustomersId() {
		return customersId;
	}

	public void setCustomersId(Long customersId) {
		this.customersId = customersId;
	}
	
	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}

	public String getPacklist() {
		return packlist;
	}

	public void setPacklist(String packlist) {
		this.packlist = packlist;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}